document.write("<script type='text/javascript' src='js/bootstrap-paginator.min.js'></script>");
function pagination (currentPage, totalPages, url) {
	var options = {
		currentPage: currentPage,//当前页
		totalPages: totalPages,//总页数
		numberofPages: 5,//显示的页数
		
		itemTexts: function(type, page, current) { //修改显示文字
			switch (type) {
				case "first":
					return "第一页";
				case "prev":
					return "上一页";
				case "next":
					return "下一页";
				case "last":
					return "最后一页";
				case "page":
					return page;
			}
		}, 
		onPageClicked: function (event, originalEvent, type, page) { //异步换页
			//当前页禁止点击
			if(Number(currentPage) != Number(page)) {
				location.href = url + "?page=" + page;
			}

			/*$.post("/Exam/GetExamLogs",{page:page,take:2},function(data) {
				$("#logtable").html(data);
			});*/
		},
				
	};
	$("#pagination").bootstrapPaginator(options);
}

//获取url指定参数的值
function getUrlParam(name) {
	if (name = (new RegExp('[?&]' + encodeURIComponent(name) + '=([^&]*)')).exec(location.search))
	return decodeURIComponent(name[1]);
};
